import { SHIPPING_STATUS_SELECT_LIST, APPROVAL_STATUS_SELECT_LIST } from './common'

// 供应商管理 - 运费管理列表
const INITIAL_FIELDS_VALUE = {
  documentNo: '',
  supplierCode: '',
  supplierName: '',
  creator: '',
  creatorDepartment: '',
  createDate: ['', ''],
  shippingStatus: '',
  approvalStatus: '',
}
const FORM_ITEM_LIST = [
  {
    prop: 'documentNo',
    label: '单据号',
    type: 'input',
  },
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input',
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input',
  },
  {
    prop: 'creator',
    label: '创建人',
    type: 'input',
  },
  {
    prop: 'creatorDepartment',
    label: '创建人部门',
    type: 'input',
  },
  {
    prop: 'createDate',
    label: '创建日期',
    type: 'datePicker',
  },
  {
    prop: 'shippingStatus',
    label: '运费状态',
    type: 'select',
    options: SHIPPING_STATUS_SELECT_LIST,
  },
  {
    prop: 'approvalStatus',
    label: '审批状态',
    type: 'select',
    options: APPROVAL_STATUS_SELECT_LIST,
  },
]
const TABLE_COLUMNS = [
  {
    title: '序号',
    type: 'seq',
    width: 50
  },
  {
    title: '供应商代码',
    field: 'supplierCode',
  },
  {
    title: '供应商名称',
    field: 'supplierName',
  },
  {
    title: '供应商分类',
    field: 'supplierCategory',
  },
  {
    title: '供应商类型',
    field: 'supplierType',
  },
  {
    title: '主营品类代码',
    field: 'mainCategoryCode',
  },
  {
    title: '主营品类',
    field: 'mainCategoryName',
  },
  {
    title: '主营商品',
    field: 'mainGoods',
  },
  {
    title: '合作品牌',
    field: 'cooperativeBrand',
  },
  {
    title: '管理区域',
    field: 'managementArea',
  },
  {
    title: '业务对接人',
    field: 'businessDockingPerson',
  },
  {
    title: '进货次数',
    field: 'purchaseNumber',
  },
  {
    title: '进货总额度',
    field: 'totalPurchaseDegree',
  },
  {
    title: '创建日期',
    field: 'createDate',
  },
  {
    title: '操作',
    showOverflow: false,
    minWidth: 50,
    slots: { default: 'operate' }
  }
]

const VIEW_FREIGHT_TABLE_COLUMNS = [
  { field: 'supplierCode', title: '供应商代码', width: 120 },
  { field: 'supplierName', title: '供应商名称', width: 120 },
  { field: 'supplyFleet', title: '供货车队', width: 120 },
  { field: 'supplierManagerAreaName', title: '所属区域', width: 120 },
  { field: 'shippingType', title: '运费类型', width: 120 },
  { field: 'unit', title: '计量单位', width: 120 },
  { field: 'price', title: '单价（元）', width: 120 },
  { field: 'floatingScale', title: '浮动比例', width: 120 },
  { field: 'shippingDescription', title: '运费描述' },
  { field: 'enable', title: '是否启用', width: 120 },
  { field: 'remark', title: '备注' },
]
export default {
  INITIAL_FIELDS_VALUE,
  FORM_ITEM_LIST,
  TABLE_COLUMNS,
  VIEW_FREIGHT_TABLE_COLUMNS,
}
